<%-- 
    Document   : main
    Created on : 2010-02-03, 01:18:55
    Author     : Admin
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="e" uri="http://java.sun.com/jsp/jstl/core" %>
<%@include file="newhtml.html" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<f:view>
    <html>
        <head>
            <%
             out.println("<link rel=\"stylesheet\" type=\"text/css\" href=\"faces/styl.css\"/>");
            %>
             <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

            <title>Przelew</title>
          <jsp:useBean id="kasaBean" scope="application" class="beans.kasaBean" />
          <h:form>
                Stan rachunku nr: <%=session.getAttribute("nr") %> wynosi: <%=session.getAttribute("kasa")%> zł

            <table>
                <tr><td>Nr rachunku odbiorcy:</td>
                    <td>
                        <h:inputText id="nr_odb" value="#{kasaBean.odbiorca}"/>
                    </td></tr>
                <tr><td>Kwota:</td>
                    <td>
                        <h:inputText id="kwota" value="#{kasaBean.kwota}"/>
                    
                    </td></tr>
            </table>
                   <br>
                 
                   <%
              //     request.setAttribute("kasa", session.getAttribute("kasa"));
      request.setAttribute("nadawca", session.getAttribute("nadawca"));
                   //  kasaBean.setKasa(Double.valueOf(session.getAttribute("kasa").toString()));
        kasaBean.setNadawca(session.getAttribute("nr").toString());

        %>
        <h:commandButton value="Wyślij" action="#{kasaBean.licz}"/>
       
                   <%
                   if(kasaBean.wynik)
                   response.sendRedirect("/nowa/newServlet");

                   }
                   %>

            </h:form>
            <%
            
            %>
        </head>
        <body>
            
        </body>
    </html>
</f:view>
